package com.liam.apppush.controller;


import com.liam.apppush.client.getui.GeTuiUserClient;
import com.liam.apppush.vo.MessageVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/yogoapi/appUser")
public class AppUserController {


    @Autowired
    private GeTuiUserClient pushUserClient;

    @PostMapping("setTags")
    public String setTags(MessageVo messageVo) {
        List<String> tagList = new ArrayList<>();
        tagList.add("18-20");
        tagList.add("杭州");
        tagList.add("美女");
        pushUserClient.setTags(messageVo.getCId(),tagList);

        return "ok";
    }

    @PostMapping("getUserTags")
    public String getUserTags(MessageVo messageVo) {
        pushUserClient.getUserTags(messageVo.getCId());

        return "ok";
    }





}
